package com.gridmobi.xrtb.model.openrtb23;


import com.alibaba.fastjson.JSONObject;
import com.gridmobi.xrtb.domain.dsp.DspTrackLog;
import com.gridmobi.xrtb.model.RtbBidRequest;

import java.util.Collection;

public class OpenRTB23BidRequest extends RtbBidRequest {
	private String id;
	private Imp[] imp;
	private Site site;
	private App app;
	private Device device;
	private User user;
	private int test=0;
	private int at=2;
	private int tmax;
	private String[] wseat;
	private int allimps=0;
	private String[] cur;
	private String[] bcat;
	private String[] badv;
	private String[] bapp;
	private Regs regs;
	private Collection<String> wlang;
	private BidRequestExtension ext;
	/**
	 * 自定义属性
	 */
	private DspTrackLog dspTrackLog;
	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}


	/**
	 * @return the imp
	 */
	public Imp[] getImp() {
		return imp;
	}


	/**
	 * @param imp the imp to set
	 */
	public void setImp(Imp[] imp) {
		this.imp = imp;
	}


	/**
	 * @return the site
	 */
	public Site getSite() {
		return site;
	}


	/**
	 * @param site the site to set
	 */
	public void setSite(Site site) {
		this.site = site;
	}


	/**
	 * @return the app
	 */
	public App getApp() {
		return app;
	}


	/**
	 * @param app the app to set
	 */
	public void setApp(App app) {
		this.app = app;
	}


	/**
	 * @return the device
	 */
	public Device getDevice() {
		return device;
	}

	/**
	 * @param device the device to set
	 */
	public void setDevice(Device device) {
		this.device = device;
	}


	/**
	 * @return the user
	 */
	public User getUser() {
		return user;
	}


	/**
	 * @param user the user to set
	 */
	public void setUser(User user) {
		this.user = user;
	}


	/**
	 * @return the test
	 */
	public int getTest() {
		return test;
	}


	/**
	 * @param test the test to set
	 */
	public void setTest(int test) {
		this.test = test;
	}


	/**
	 * @return the at
	 */
	public int getAt() {
		return at;
	}


	/**
	 * @param at the at to set
	 */
	public void setAt(int at) {
		this.at = at;
	}


	/**
	 * @return the tmax
	 */
	public int getTmax() {
		return tmax;
	}


	/**
	 * @param tmax the tmax to set
	 */
	public void setTmax(int tmax) {
		this.tmax = tmax;
	}


	/**
	 * @return the wseat
	 */
	public String[] getWseat() {
		return wseat;
	}


	/**
	 * @param wseat the wseat to set
	 */
	public void setWseat(String[] wseat) {
		this.wseat = wseat;
	}


	/**
	 * @return the allimps
	 */
	public int getAllimps() {
		return allimps;
	}


	/**
	 * @param allimps the allimps to set
	 */
	public void setAllimps(int allimps) {
		this.allimps = allimps;
	}


	/**
	 * @return the cur
	 */
	public String[] getCur() {
		return cur;
	}


	/**
	 * @param cur the cur to set
	 */
	public void setCur(String[] cur) {
		this.cur = cur;
	}


	/**
	 * @return the bcat
	 */
	public String[] getBcat() {
		return bcat;
	}


	/**
	 * @param bcat the bcat to set
	 */
	public void setBcat(String[] bcat) {
		this.bcat = bcat;
	}


	/**
	 * @return the badv
	 */
	public String[] getBadv() {
		return badv;
	}


	/**
	 * @param badv the badv to set
	 */
	public void setBadv(String[] badv) {
		this.badv = badv;
	}


	/**
	 * @return the bapp
	 */
	public String[] getBapp() {
		return bapp;
	}


	/**
	 * @param bapp the bapp to set
	 */
	public void setBapp(String[] bapp) {
		this.bapp = bapp;
	}


	/**
	 * @return the regs
	 */
	public Regs getRegs() {
		return regs;
	}


	/**
	 * @param regs the regs to set
	 */
	public void setRegs(Regs regs) {
		this.regs = regs;
	}


	/**
	 * @return the ext
	 */
	public BidRequestExtension getExt() {
		return ext;
	}


	/**
	 * @param ext the ext to set
	 */
	public void setExt(BidRequestExtension ext) {
		this.ext = ext;
	}


	public DspTrackLog getDspTrackLog() {
		return dspTrackLog;
	}

	public void setDspTrackLog(DspTrackLog dspTrackLog) {
		this.dspTrackLog = dspTrackLog;
	}

	public Collection<String> getWlang() {
		return wlang;
	}

	public void setWlang(Collection<String> wlang) {
		this.wlang = wlang;
	}


	public static void main(String[] args) {
		String json = "{\n" +
				"  \"allimps\": 0,\n" +
				"  \"app\": {\n" +
				"    \"bundle\": \"defaultBundleId\",\n" +
				"    \"cat\": [\n" +
				"      \"IAB7-42\"\n" +
				"    ],\n" +
				"    \"id\": \"272\",\n" +
				"    \"name\": \"app-1\",\n" +
				"    \"publisher\": {\n" +
				"      \"id\": \"5020371\",\n" +
				"      \"name\": \"PublisherNameFromSPX\"\n" +
				"    },\n" +
				"    \"storeurl\": \"https://itunes.apple.com/app/apple-store/id953922567567341232323\"\n" +
				"  },\n" +
				"  \"at\": 2,\n" +
				"  \"bcat\": [\n" +
				"    \"IAB17-18\",\n" +
				"    \"IAB7-42\",\n" +
				"    \"IAB23\",\n" +
				"    \"IAB7-28\",\n" +
				"    \"IAB26\",\n" +
				"    \"IAB25\",\n" +
				"    \"IAB9-9\",\n" +
				"    \"IAB24\"\n" +
				"  ],\n" +
				"  \"device\": {\n" +
				"    \"connectiontype\": 0,\n" +
				"    \"devicetype\": 4,\n" +
				"    \"didmd5\": \"d1c553888076489a45af4b6dfb9392eb\",\n" +
				"    \"didsha1\": \"81407cd1808b59681f2da1341d8ac62dfa9293fa\",\n" +
				"    \"geo\": {\n" +
				"      \"city\": \"Boston\",\n" +
				"      \"country\": \"USA\",\n" +
				"      \"ipservice\": 3,\n" +
				"      \"lat\": 42.360504,\n" +
				"      \"lon\": -71.0548,\n" +
				"      \"metro\": \"506\",\n" +
				"      \"region\": \"MA\",\n" +
				"      \"type\": 2,\n" +
				"      \"zip\": \"02109\"\n" +
				"    },\n" +
				"    \"h\": 480,\n" +
				"    \"ip\": \"50.255.150.200\",\n" +
				"    \"js\": 0,\n" +
				"    \"language\": \"en\",\n" +
				"    \"make\": \"Apple\",\n" +
				"    \"model\": \"iPhone\",\n" +
				"    \"os\": \"iOS\",\n" +
				"    \"osv\": \"4.3.2\",\n" +
				"    \"pxratio\": 1,\n" +
				"    \"ua\": \"Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5\",\n" +
				"    \"w\": 320\n" +
				"  },\n" +
				"  \"id\": \"820e63f1-d68a-4267-ad8d-c63b9329d3db\",\n" +
				"  \"imp\": [\n" +
				"    {\n" +
				"      \"banner\": {\n" +
				"        \"btype\": [\n" +
				"          1,\n" +
				"          3\n" +
				"        ],\n" +
				"        \"format\": [\n" +
				"          {\n" +
				"            \"h\": 50,\n" +
				"            \"w\": 320\n" +
				"          }\n" +
				"        ],\n" +
				"        \"h\": 50,\n" +
				"        \"mimes\": [\n" +
				"          \"image/jpeg\",\n" +
				"          \"image/png\",\n" +
				"          \"image/gif\"\n" +
				"        ],\n" +
				"        \"pos\": 0,\n" +
				"        \"w\": 320\n" +
				"      },\n" +
				"      \"displaymanager\": \"SOMA\",\n" +
				"      \"ext\": {\n" +
				"        \"strictbannersize\": 0\n" +
				"      },\n" +
				"      \"id\": \"1\",\n" +
				"      \"instl\": 0,\n" +
				"      \"secure\": 0,\n" +
				"      \"tagid\": \"5020497\"\n" +
				"    }\n" +
				"  ],\n" +
				"  \"regs\": {\n" +
				"    \"coppa\": 0,\n" +
				"    \"ext\": {\n" +
				"      \"gdpr\": 0\n" +
				"    }\n" +
				"  },\n" +
				"  \"source\": {\n" +
				"    \"pchain\": \"07bcf65f187117b4:5020371\"\n" +
				"  },\n" +
				"  \"tmax\": 1500,\n" +
				"  \"user\": {\n" +
				"    \"ext\": {\n" +
				"      \n" +
				"    },\n" +
				"    \"gender\": \"M\",\n" +
				"    \"yob\": 1977\n" +
				"  }\n" +
				"}";

		JSONObject.toJavaObject(JSONObject.parseObject(json),OpenRTB23BidRequest.class);
		System.out.println(11);
	}
}